<?php

/**
 * AccountOwner form base class.
 *
 * @method AccountOwner getObject() Returns the current form's model object
 *
 * @package    erpcrm
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseAccountOwnerForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'contact_iden'                 => new sfWidgetFormInputHidden(),
      'sss_number'                   => new sfWidgetFormInputText(),
      'health_card_number'           => new sfWidgetFormInputText(),
      'tin_number'                   => new sfWidgetFormInputText(),
      'home_development_fund_number' => new sfWidgetFormInputText(),
      'vat_excempt_type'             => new sfWidgetFormInputText(),
      'tax_codes'                    => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'contact_iden'                 => new sfValidatorPropelChoice(array('model' => 'Contact', 'column' => 'iden', 'required' => false)),
      'sss_number'                   => new sfValidatorString(array('max_length' => 30)),
      'health_card_number'           => new sfValidatorString(array('max_length' => 30)),
      'tin_number'                   => new sfValidatorString(array('max_length' => 30)),
      'home_development_fund_number' => new sfValidatorString(array('max_length' => 30)),
      'vat_excempt_type'             => new sfValidatorString(array('max_length' => 20)),
      'tax_codes'                    => new sfValidatorString(),
    ));

    $this->widgetSchema->setNameFormat('account_owner[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AccountOwner';
  }


}
